<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Is2</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="Is2博客，分享、学习。">
<meta property="og:type" content="website">
<meta property="og:title" content="Is2">
<meta property="og:url" content="/page/2/index.html">
<meta property="og:site_name" content="Is2">
<meta property="og:description" content="Is2博客，分享、学习。">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Is2">
<meta name="twitter:description" content="Is2博客，分享、学习。">
  
    <link rel="alternate" href="/atom.xml" title="Is2" type="application/atom+xml">
  
  
    <link rel="icon" href="img/logo.ico">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

  

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" integrity="sha384-XdYbMnZ/QjLh6iI4ogqCTaIjrFk87ip+ekIjefZch0Y+PvJ8CDYtEs1ipDmPorQ+" crossorigin="anonymous">

  <link rel="stylesheet" href="/css/styles.css" type="text/css">
  

  
  <!--百度统计代码-->
  <script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?37b51d72e2b91d854971620de6fef9bc";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<!--百度自动推送代码-->
<script>
(function(){
    var bp = document.createElement('script');
    bp.src = '//push.zhanzhang.baidu.com/push.js';
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
</head>

<body>
  <nav class="navbar navbar-inverse">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-menu-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="main-menu-navbar">
      <ul class="nav navbar-nav">
        
          <li><a class=""
                 href="/index.html">首页</a></li>
        
          <li><a class=""
                 href="/categories/文集/">文集</a></li>
        
          <li><a class=""
                 href="/archives/">归档</a></li>
        
          <li><a class=""
                 href="/resource/">资源</a></li>
        
          <li><a class=""
                 href="/about/">关于</a></li>
        
        <li> <a href="/atom.xml">RSS</a> </li> 
      </ul>

      <!--
      <ul class="nav navbar-nav navbar-right">
        
          <li><a href="/atom.xml" title="RSS Feed"><i class="fa fa-rss"></i></a></li>
        
      </ul>
      -->
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

  <div class="container">
    <div class="blog-header">
  <h1 class="blog-title">Is2</h1>
  
    <p class="lead blog-description">我只想做的更好</p>
  
</div>

    <div class="row">
        <div class="col-sm-8 blog-main">
          
  
    <article id="post-Usage-of-yield-in-c-#" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/26/Usage-of-yield-in-c-#/">c#中yield的用法</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/26/Usage-of-yield-in-c-#/" class="article-date"><time datetime="2016-03-26T09:01:24.000Z" itemprop="datePublished">2016-03-26</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/c/">c#</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>　　记录一下c#中的一个关键字<code>yield</code>的用法，之前基本没怎么用过这个算是语法糖的关键字，最近做了一个小的机构账号管理项目，读取DataReader对象数据时，每一次都得Add到集合中，记得以前见过有人用过这个方法，写起来很方便，所以学习了一下，记录下来以备查看。</p>
<h3 id="之前查找数据库数据的部分代码">之前查找数据库数据的部分代码</h3><figure class="highlight ocaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">public <span class="type">List</span>&lt;<span class="type">Organization</span>&gt; <span class="type">OrgModel</span>=<span class="keyword">new</span> <span class="type">List</span>&lt;<span class="type">Organization</span>&gt;<span class="literal">()</span>;</span><br><span class="line"><span class="built_in">string</span> sqlText=<span class="string">"select * from Organization"</span>;</span><br><span class="line">var dataTable = <span class="type">SqlHelper</span>.<span class="type">ExecuteReader</span>(sqlText);</span><br><span class="line">            <span class="keyword">if</span> (dataTable.<span class="type">HasRows</span>)</span><br><span class="line">            &#123;</span><br><span class="line">                <span class="keyword">while</span> (dataTable.<span class="type">Read</span><span class="literal">()</span>)</span><br><span class="line">                &#123;</span><br><span class="line">                    <span class="type">Organization</span> org = <span class="keyword">new</span> <span class="type">Organization</span><span class="literal">()</span>;</span><br><span class="line">                    org.org_code = dataTable[<span class="string">"org_code"</span>].<span class="type">ToString</span><span class="literal">()</span>;</span><br><span class="line">                    org.org_name = dataTable[<span class="string">"org_name"</span>].<span class="type">ToString</span><span class="literal">()</span>;</span><br><span class="line">                    org.org_acount = dataTable[<span class="string">"org_acount"</span>].<span class="type">ToString</span><span class="literal">()</span>;</span><br><span class="line">                    org.org_password = dataTable[<span class="string">"org_password"</span>].<span class="type">ToString</span><span class="literal">()</span>;</span><br><span class="line">                    <span class="type">OrgModel</span>.<span class="type">Add</span>(org);</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">            return orgModel;</span><br></pre></td></tr></table></figure>
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/26/Usage-of-yield-in-c-#/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/26/Usage-of-yield-in-c-#/" data-id="ciqvzmhrv004ocsvlcywjr01s" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/c-基础知识/">c#基础知识</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-What-is-a-real-programming-skills" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/25/What-is-a-real-programming-skills/">什么才算是真正的编程能力？</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/25/What-is-a-real-programming-skills/" class="article-date"><time datetime="2016-03-25T14:04:19.000Z" itemprop="datePublished">2016-03-25</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/文集/">文集</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>转载自<a href="http://www.imooc.com/article/1097">慕课网</a></p>
<p>知乎上看到一题主的发问：</p>
<blockquote>
<p>还在读书，也在实验室帮忙做了些东西，自己也搭过几个网站。在周围人看来似乎好像我很厉害，做了那么多东西，但是我发现这些东西虽然是我做的，但是实际上我手把手自己写的代码却并没有多少，很多都是用开源的东西，我写的代码无非是把别人的东西整合下，类似于胶水一样的工作。<br>我之前所认为的编程是全手动一行一行敲代码，但是现在我发现哪怕是工程上也有很多人是复制黏贴来解决问题的，并且提倡不要重复造轮子。<br>但是靠谷歌和复制别人的轮子，虽然我做出了很多东西，可是我并不觉得自己能力上有提升，倒是利用搜索引擎的能力的确提升了不少。而学校里另外一波搞ACM的人，他们每天刷题练算法，或许倒是的确提升了点编程能力，但是对工程几乎一窍不通。<br>所以我现在就很困惑，所谓的编程能力到底是什么，我该如何提升自己的编程能力？</p>
</blockquote>
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/25/What-is-a-real-programming-skills/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/25/What-is-a-real-programming-skills/" data-id="ciqvzmhqe003ecsvlke99wnlk" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/转载/">转载</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/随笔/">随笔</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-Collector-10-jQuery-tips" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/25/Collector-10-jQuery-tips/">值得收藏的10个jQuery小技巧</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/25/Collector-10-jQuery-tips/" class="article-date"><time datetime="2016-03-25T13:25:54.000Z" itemprop="datePublished">2016-03-25</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/前端开发/">前端开发</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>转载自<a href="http://www.imooc.com/article/1686">慕课网</a></p>
<h3 id="1-返回顶部按钮">1.返回顶部按钮</h3><p>你可以利用 animate 和 scrollTop 来实现返回顶部的动画，而不需要使用其他插件。<br><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">// Back to top</span><br><span class="line">$('a.top').click(function () &#123;</span><br><span class="line">  $(document.body).animate(&#123;scrollTop: 0&#125;, 800);</span><br><span class="line">  return false;</span><br><span class="line">&#125;);</span><br><span class="line"><span class="comment">&lt;!-- Create an anchor tag --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="title">a</span> <span class="attribute">class</span>=<span class="value">"top"</span> <span class="attribute">href</span>=<span class="value">"#"</span>&gt;</span>Back to top<span class="tag">&lt;/<span class="title">a</span>&gt;</span></span><br></pre></td></tr></table></figure></p>
<p>改变 scrollTop 的值可以调整返回距离顶部的距离，而 animate 的第二个参数是执行返回动作需要的时间(单位：毫秒)。<br>
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/25/Collector-10-jQuery-tips/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/25/Collector-10-jQuery-tips/" data-id="ciqvzmhpy0033csvlzvddeghv" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/jQuery/">jQuery</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/转载/">转载</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-Ashx-pages-use-Session" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/20/Ashx-pages-use-Session/">在ashx页中使用Session</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/20/Ashx-pages-use-Session/" class="article-date"><time datetime="2016-03-20T15:30:19.000Z" itemprop="datePublished">2016-03-20</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/ASP-NET/">ASP.NET</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>　　</p>
<h3 id="正文">正文</h3><p>　　在ashx中使用Session不能直接<code>context.Session[&quot;sessionName&quot;]=value;</code> ,需要引入一个命名空间和继承一个接口。<br>　　命名空间：<code>using System.Web.SessionState;</code>  作用：“IRequiresSessionState”接口的命名空间<br>　　接口：<code>IRequiresSessionState</code>    作用:指定目标 HTTP 处理程序需要对会话状态值具有读写访问权
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/20/Ashx-pages-use-Session/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/20/Ashx-pages-use-Session/" data-id="ciqvzmhpj002qcsvl4i9ge6pf" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/WebForm/">WebForm</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-Hexo-Getting-Started-6" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/08/Hexo-Getting-Started-6/">6、将博客部署到coding并绑定域名</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/08/Hexo-Getting-Started-6/" class="article-date"><time datetime="2016-03-08T13:52:33.000Z" itemprop="datePublished">2016-03-08</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>　　由于墙的原因，github访问速度很慢，而且github屏蔽了百度蜘蛛，所以将博客部署到github对国内的访客来说，并不是最好的选择，这一篇我们介绍一下，怎么将博客同时部署到github和coding上，然后绑定域名，并且分别指向国外和国内线路。</p>
<h2 id="将博客同时部署到coding上">将博客同时部署到coding上</h2><p>　　之前是gitcafe+github的部署方式，奈何gitcafe被coding给收了，感叹世事变幻无常啊。还好coding也提供了pages服务，我们可以将博客部署到coding上。<br>
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/08/Hexo-Getting-Started-6/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/08/Hexo-Getting-Started-6/" data-id="ciqvzmhuo006zcsvles6gr2rx" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo博客搭建/">Hexo博客搭建</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-Hexo-Getting-Started-6" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/07/Hexo-Getting-Started-6/">5、Hexo博客的写作</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/07/Hexo-Getting-Started-6/" class="article-date"><time datetime="2016-03-07T13:12:55.000Z" itemprop="datePublished">2016-03-07</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>　　这一篇介绍一下Hexo中怎么写博客的，无论怎么折腾，认认真真的写博客才是最主要的。
　　</p>
<h2 id="创建文章">创建文章</h2><p>　　Hexo创建一篇博文很简单，只需要在博客所在目录下打开“Git Bash Here”命令行窗口，输入：<br><figure class="highlight actionscript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo <span class="keyword">new</span> <span class="string">"你文章的名字"</span></span><br></pre></td></tr></table></figure></p>
<p>　　然后回车即可创建一篇文章。注意，在博客名称中没有特殊字符时可以不写双引号，但是建议大家每次都写上比较好。<br>　　创建的博文默认在<code>\source\_posts\</code>目录下面，进入该文件夹，找到并打开即可。<br>　　打开之后可以看到，自动生成了一些信息：
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/07/Hexo-Getting-Started-6/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/07/Hexo-Getting-Started-6/" data-id="ciqvzmhv30078csvll29csed5" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo博客搭建/">Hexo博客搭建</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-Hexo-Getting-Started-4" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/06/Hexo-Getting-Started-4/">4、Hexo博客主题的修改</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/06/Hexo-Getting-Started-4/" class="article-date"><time datetime="2016-03-06T14:54:10.000Z" itemprop="datePublished">2016-03-06</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>　　在这一篇中介绍一下Hexo主题的一些修改方法，在这里是基于默认主题介绍的，但是了解一下，对使用其他主题也有些帮助。</p>
<h2 id="主题文件说明">主题文件说明</h2><p>　　依次打开博客文件夹根目录下的<code>themes\landscape\</code>，可以看见主题包里面一些文件夹和文件，我们先认识一下这些文件分别是什么：<br><img src="http://ww3.sinaimg.cn/mw690/c55a7aeejw1f1njlex0x6j208508hgli.jpg" alt=""><br>　　1. <code>languages</code>：语言文件包，存放网页语言文件。<br>　　2. <code>layout</code>：页面模板文件夹，保存生成静态页面的HTML模板文件，使用的是EJS模板引擎编写，会HTML的话就很容易看懂。<br>　　3. <code>scripts</code>：存放网页中要使用的脚本文件。
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/06/Hexo-Getting-Started-4/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/06/Hexo-Getting-Started-4/" data-id="ciqvzmhv3007ecsvlzjhyavuo" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo博客搭建/">Hexo博客搭建</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-Hexo-Getting-Started-3" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/05/Hexo-Getting-Started-3/">3、Hexo博客配置和主题</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/05/Hexo-Getting-Started-3/" class="article-date"><time datetime="2016-03-05T15:16:49.000Z" itemprop="datePublished">2016-03-05</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>　　这一篇中，我们介绍一下对Hexo博客的配置，和主题的一些设置。</p>
<h2 id="博客网站信息配置">博客网站信息配置</h2><p>　　在创建的博客文件夹根目录(比如我的是E:\Is2Blog),找到名为<code>_config.yml</code>的配置文件，使用编辑器打开，具体的配置信息说明在下面：
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/05/Hexo-Getting-Started-3/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/05/Hexo-Getting-Started-3/" data-id="ciqvzmhv3007kcsvlyo66ivk6" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo博客搭建/">Hexo博客搭建</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-Hexo-Getting-Started-2" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/05/Hexo-Getting-Started-2/">2、安装并部署Hexo博客</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/05/Hexo-Getting-Started-2/" class="article-date"><time datetime="2016-03-05T12:46:11.000Z" itemprop="datePublished">2016-03-05</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>　　下面的搭建过程是在Windows系统上进行的，Linux系统和OSX系统可以看<a href="https://hexo.io/zh-cn/docs/index.html">官方文档</a>。</p>
<h2 id="安装">安装</h2><p>　　因为Hexo是基于nodejs编写的，而且使用Git进行管理，所以需要安装这两个工具。<br><strong>安装Git工具</strong><br>　　直接百度Git的Windows安装包或者去<a href="http://git-scm.com/download/">官网下载</a>安装，安装过程中无需特殊设置，一路next即可。</p>
<p><strong>安装NodeJs</strong><br>　　nodejs也可以直接去<a href="http://nodejs.cn/">中文网</a>或<a href="http://nodejs.org/">英文官网</a>下载。nodejs有两个版本：LTS(长期支持版)、Stable(稳定版)。建议大家下载LTS长期支持版。<br>
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/05/Hexo-Getting-Started-2/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/05/Hexo-Getting-Started-2/" data-id="ciqvzmhvj007ncsvl7ad75jkq" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo博客搭建/">Hexo博客搭建</a></li></ul>


    </footer>
  </div>
  
</article>


  
    <article id="post-Hexo-Getting-Started-1" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 itemprop="name">
      <a class="article-title" href="/2016/03/05/Hexo-Getting-Started-1/">1、Hexo博客简介</a>
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/2016/03/05/Hexo-Getting-Started-1/" class="article-date"><time datetime="2016-03-05T09:55:45.000Z" itemprop="datePublished">2016-03-05</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
  </div>

  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        <p>　　当你点开这篇博客的时候，说明你对写博客是感兴趣的，那就跟着我一起学习搭建自己的博客吧。</p>
<p>　　首先让我们先探究三个问题：</p>
<h2 id="为什么要写博客？">为什么要写博客？</h2><p>　　我觉得这个问题应该是很多人不会说，但是心里还是会问的，我为什么要写博客，写博客有什么好处吗？对此我总结了几点：<br>　　1. 总结<br>　　　　这是第一点，也是个人认为最重要的一点。我们每天接受的新知识可能非常多，也非常杂，很多时候我们在课堂上或者在看书的时候都是在笔记本上记录零散的知识点，或者在工作开发中将遇到的问题以及解决办法记录下来。但是这些东西对我们来说都是过了一遍罢了，没有起到大的作用。所以我说的总结，就是总结自己学习工作，有一个系统的总结，对我们理解问题有很大的帮助。
        
          <p class="article-more-link">
            <a class="btn btn-primary" href="/2016/03/05/Hexo-Getting-Started-1/#more">阅读更多</a>
          </p>
        
      
    </div>

    
    <br/><br/>
<!--baidu share-->

<!--baidu share-->
    <footer class="article-footer">
      <a data-url="/2016/03/05/Hexo-Getting-Started-1/" data-id="ciqvzmhvj007qcsvlt2yta1ha" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo博客搭建/">Hexo博客搭建</a></li></ul>


    </footer>
  </div>
  
</article>


  


  <div id="page-nav">
    <nav><ul class="pagination"><li><a class="page-prev" rel="prev" href="/"><i class="fa fa-chevron-left"></i> Prev</a></li><li><a class="page-number" href="/">1</a></li><li class="active"><span class="page-number">2</span></li><li><a class="page-number" href="/page/3/">3</a></li><li><a class="page-number" href="/page/4/">4</a></li><li class="disabled"><span class="page-space">&hellip;</span></li><li><a class="page-number" href="/page/9/">9</a></li><li><a class="page-next" rel="next" href="/page/3/">Next <i class="fa fa-chevron-right"></i></a></li></ul></nav>
  </div>



        </div>
        <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
          
  <div class="sidebar-module sidebar-module-inset">
<a style="text-decoration:none" title="有本事点我一下试试.." href='javascript:(function() {
	function c() {
		var e = document.createElement("link");
		e.setAttribute("type", "text/css");
		e.setAttribute("rel", "stylesheet");
		e.setAttribute("href", f);
		e.setAttribute("class", l);
		document.body.appendChild(e)
	}
 
	function h() {
		var e = document.getElementsByClassName(l);
		for (var t = 0; t < e.length; t++) {
			document.body.removeChild(e[t])
		}
	}
 
	function p() {
		var e = document.createElement("div");
		e.setAttribute("class", a);
		document.body.appendChild(e);
		setTimeout(function() {
			document.body.removeChild(e)
		}, 100)
	}
 
	function d(e) {
		return {
			height : e.offsetHeight,
			width : e.offsetWidth
		}
	}
 
	function v(i) {
		var s = d(i);
		return s.height > e && s.height < n && s.width > t && s.width < r
	}
 
	function m(e) {
		var t = e;
		var n = 0;
		while (!!t) {
			n += t.offsetTop;
			t = t.offsetParent
		}
		return n
	}
 
	function g() {
		var e = document.documentElement;
		if (!!window.innerWidth) {
			return window.innerHeight
		} else if (e && !isNaN(e.clientHeight)) {
			return e.clientHeight
		}
		return 0
	}
 
	function y() {
		if (window.pageYOffset) {
			return window.pageYOffset
		}
		return Math.max(document.documentElement.scrollTop, document.body.scrollTop)
	}
 
	function E(e) {
		var t = m(e);
		return t >= w && t <= b + w
	}
 
	function S() {
		var e = document.createElement("audio");
		e.setAttribute("class", l);
		e.src = i;
		e.loop = false;
		e.addEventListener("canplay", function() {
			setTimeout(function() {
				x(k)
			}, 500);
			setTimeout(function() {
				N();
				p();
				for (var e = 0; e < O.length; e++) {
					T(O[e])
				}
			}, 15500)
		}, true);
		e.addEventListener("ended", function() {
			N();
			h()
		}, true);
		e.innerHTML = " <p>If you are reading this, it is because your browser does not support the audio element. We recommend that you get a new browser.</p> <p>";
		document.body.appendChild(e);
		e.play()
	}
 
	function x(e) {
		e.className += " " + s + " " + o
	}
 
	function T(e) {
		e.className += " " + s + " " + u[Math.floor(Math.random() * u.length)]
	}
 
	function N() {
		var e = document.getElementsByClassName(s);
		var t = new RegExp("\\b" + s + "\\b");
		for (var n = 0; n < e.length; ) {
			e[n].className = e[n].className.replace(t, "")
		}
	}
 
	var e = 30;
	var t = 30;
	var n = 350;
	var r = 350;
	var i = "//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake.mp3";
	var s = "mw-harlem_shake_me";
	var o = "im_first";
	var u = ["im_drunk", "im_baked", "im_trippin", "im_blown"];
	var a = "mw-strobe_light";
	var f = "//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake-style.css";
	var l = "mw_added_css";
	var b = g();
	var w = y();
	var C = document.getElementsByTagName("*");
	var k = null;
	for (var L = 0; L < C.length; L++) {
		var A = C[L];
		if (v(A)) {
			if (E(A)) {
				k = A;
				break
			}
		}
	}
	if (A === null) {
		console.warn("Could not find a node of the right size. Please try a different page.");
		return
	}
	c();
	S();
	var O = [];
	for (var L = 0; L < C.length; L++) {
		var A = C[L];
		if (v(A)) {
			O.push(A)
		}
	}
})()'>
    <h4>Hi</h4>
</a>

  
  <h5>我是海建东,欢迎访问我的博客.</h5>

</div>


  
  <div class="sidebar-module">
    <h4>分类</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/ASP-NET/">ASP.NET</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/ASP-NET-Web-API/">ASP.NET Web API</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/Asp-Net-MVC/">Asp.Net MVC</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/Git/">Git</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/Hexo/">Hexo</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/SQL/">SQL</a><span class="sidebar-module-list-count">8</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/UWP/">UWP</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/Umbraco/">Umbraco</a><span class="sidebar-module-list-count">11</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/c/">c#</a><span class="sidebar-module-list-count">18</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/前端开发/">前端开发</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/文集/">文集</a><span class="sidebar-module-list-count">12</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/设计模式/">设计模式</a><span class="sidebar-module-list-count">6</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>标签</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/ASP-NET/">ASP.NET</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/ASP-NET-Core/">ASP.NET Core</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/ASP-NET-Web-API笔记/">ASP.NET Web API笔记</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/AngularJS/">AngularJS</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/Asp-Net-MVC/">Asp.Net MVC</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/EntityFramework/">EntityFramework</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/Git学习/">Git学习</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/Hexo博客搭建/">Hexo博客搭建</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/SQL-Server/">SQL Server</a><span class="sidebar-module-list-count">8</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/UWP学习笔记/">UWP学习笔记</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/Umbraco入门/">Umbraco入门</a><span class="sidebar-module-list-count">11</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/WebForm/">WebForm</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/c-基础知识/">c#基础知识</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/c-学习笔记/">c#学习笔记</a><span class="sidebar-module-list-count">12</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/jQuery/">jQuery</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/影评：其实就是观后感/">影评：其实就是观后感</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/设计模式学习笔记/">设计模式学习笔记</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/转载/">转载</a><span class="sidebar-module-list-count">7</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/随笔/">随笔</a><span class="sidebar-module-list-count">8</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>归档</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2016/07/">七月 2016</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2016/05/">五月 2016</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2016/04/">四月 2016</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2016/03/">三月 2016</a><span class="sidebar-module-list-count">14</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2016/02/">二月 2016</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2016/01/">一月 2016</a><span class="sidebar-module-list-count">23</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/10/">十月 2015</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/09/">九月 2015</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/08/">八月 2015</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/07/">七月 2015</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/06/">六月 2015</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/05/">五月 2015</a><span class="sidebar-module-list-count">7</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/04/">四月 2015</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/03/">三月 2015</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/02/">二月 2015</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/01/">一月 2015</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2014/11/">十一月 2014</a><span class="sidebar-module-list-count">2</span></li></ul>
  </div>



  <!---->
  <div class="sidebar-module">
    <h4>最近访客</h4>
    <!--<ul class="sidebar-module-list">
      
        <li>
          <a href="/2016/07/19/Journey-Under-the-Midnight-Sun/">行走在白昼的夜里</a>
        </li>
      
        <li>
          <a href="/2016/07/18/Hexo-misspelled-tag/">Hexo标签分类写错的处理</a>
        </li>
      
        <li>
          <a href="/2016/07/17/Value-types-and-reference-types/">值类型和引用类型</a>
        </li>
      
        <li>
          <a href="/2016/07/17/Fiddler-caught-analysis-API/">使用Fiddler抓包分析API</a>
        </li>
      
        <li>
          <a href="/2016/05/14/Hexo-Getting-Started-1/">8、使用SSH方式部署博客</a>
        </li>
      
    </ul>
    
    <div class="ds-recent-visitors" data-num-items="12" data-avatar-size="28" id="ds-recent-visitors"></div>
-->
<!-- 多说最新评论 start -->
	<div class="ds-recent-comments" data-num-items="5" data-show-avatars="1" data-show-time="1" data-show-title="1" data-show-admin="0" data-excerpt-length="20"></div>
<!-- 多说最新评论 end -->
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:"hais2"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
<!-- 多说公共JS代码 end -->
<br><br>
<!---->

  
  <div class="sidebar-module">
    <h4>标签云</h4>
    <p class="tagcloud">
      <a href="/tags/ASP-NET/" style="font-size: 10px;">ASP.NET</a> <a href="/tags/ASP-NET-Core/" style="font-size: 11.11px;">ASP.NET Core</a> <a href="/tags/ASP-NET-Web-API笔记/" style="font-size: 10px;">ASP.NET Web API笔记</a> <a href="/tags/AngularJS/" style="font-size: 11.11px;">AngularJS</a> <a href="/tags/Asp-Net-MVC/" style="font-size: 12.22px;">Asp.Net MVC</a> <a href="/tags/EntityFramework/" style="font-size: 10px;">EntityFramework</a> <a href="/tags/Git学习/" style="font-size: 12.22px;">Git学习</a> <a href="/tags/Hexo博客搭建/" style="font-size: 17.78px;">Hexo博客搭建</a> <a href="/tags/SQL-Server/" style="font-size: 16.67px;">SQL Server</a> <a href="/tags/UWP学习笔记/" style="font-size: 11.11px;">UWP学习笔记</a> <a href="/tags/Umbraco入门/" style="font-size: 18.89px;">Umbraco入门</a> <a href="/tags/WebForm/" style="font-size: 10px;">WebForm</a> <a href="/tags/c-基础知识/" style="font-size: 14.44px;">c#基础知识</a> <a href="/tags/c-学习笔记/" style="font-size: 20px;">c#学习笔记</a> <a href="/tags/jQuery/" style="font-size: 10px;">jQuery</a> <a href="/tags/影评：其实就是观后感/" style="font-size: 13.33px;">影评：其实就是观后感</a> <a href="/tags/设计模式学习笔记/" style="font-size: 14.44px;">设计模式学习笔记</a> <a href="/tags/转载/" style="font-size: 15.56px;">转载</a> <a href="/tags/随笔/" style="font-size: 16.67px;">随笔</a>
    </p>
  </div>


  
  <div class="sidebar-module">
     <iframe width="100%" height="550" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=550&fansRow=2&ptype=1&speed=0&skin=5&isTitle=1&noborder=0&isWeibo=1&isFans=1&uid=3311041262&verifier=85e63399&dpc=1"></iframe>
  </div>


  
  <div class="sidebar-module">
    <h4>友情链接</h4>
    <a href="http://www.cnblogs.com/artech/" target="_blank">Artech</a><br/>
    <a href="http://www.deepthink.pub" target="_blank">DeepThink</a><br/>
    <a href="http://edi.wang/" target="_blank">Edi.wang</a><br/>
    <a href="http://www.lanhusoft.com/Article/List" target="_blank">LanHuSoft</a><br/>
    <a href="http://www.ruanyifeng.com/blog/" target="_blank">阮一峰的网络日志</a><br/>
    <a href="http://www.cnblogs.com/shanyou/" target="_blank">张善友</a><br/>
  </div>




        </div>
    </div>
  </div>
  <footer class="blog-footer">
  <div class="container">
    <div id="footer-info" class="inner">
      &copy; 2016 Is2<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/haijiandong/haijiandong.github.io" target="_blank">GitHub</a><br/>
      Total <span id="busuanzi_value_site_pv"></span> views.  Total <span id="busuanzi_value_site_uv"></span> guests.  Total <span id="busuanzi_value_page_pv"></span> Hits.
    </div>
  </div>
</footer>

  

<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>


<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

</body>
</html>